20bda5becc7b155085fb777c102ef8954f12c675,data-fabric/src/main/java/com/continuuity/data2/datafabric/dataset/client/DatasetManagerServiceClient.java,DatasetManagerServiceClient,deleteInstance,#String#,80
Before Change
public void deleteInstance(String datasetInstanceName) throws InstanceConflictException, IOException {
HttpResponse response = doDelete("instances/" + datasetInstanceName);
if (HttpResponseStatus.CONFLICT.getCode() == response.responseCode) {
throw new InstanceConflictException("Failed to delete instance " + datasetInstanceName +
", reason: " + getDetails(response));
}
if (HttpResponseStatus.OK.getCode() != response.responseCode) {
throw new IOException("Failed to delete instance " + datasetInstanceName + ", reason: " + getDetails(response));
}
}
After Change
}
}
public void deleteInstance(String datasetInstanceName) throws DatasetManagementException {
HttpResponse response = doDelete("instances/" + datasetInstanceName);
if (HttpResponseStatus.CONFLICT.getCode() == response.responseCode) {
throw new InstanceConflictException(String.format("Failed to delete instance %s due to conflict, details: %s",
datasetInstanceName, getDetails(response)));
}
if (HttpResponseStatus.OK.getCode() != response.responseCode) {
throw new DatasetManagementException(String.format("Failed to delete instance %s, details: %s",
datasetInstanceName, getDetails(response)));
}
}